const es = require("./es");
async function loadEs(app) {
  //加载ES及ES索引
  if (app.config.es) {
    app.es = new es(app);
    app.es.indexCreate(app);
  } else {
    app.log.warn("config[es] undefined, elasticsearch uninitialized!", true);
  }
}
module.exports = loadEs;
